package com.applet.common.utils;


import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
//扫描并且获取此文件的配置,并且传给对应的属性中
@ConfigurationProperties(prefix = "spring.mail")
@Data
public class MailProperties {
    private String host;

    private String username;

    private String password;

    private String from;

    private Integer port;

    @Value("${spring.mail.properties.mail.smtp.auth}")
    private Boolean auth;

    @Value("${spring.mail.properties.mail.smtp.starttls.enable}")
    private Boolean starttlsEnable;

    @Value("${spring.mail.properties.mail.smtp.ssl.trust}")
    private String sslTrust;
}
